export const createShop = (data = {}) => {
  return {
    url: 'shop/create',
    method: 'post',
    data: data
  }
}

export const updateShop = (data = {}) => {
  return {
    url: 'shop/update',
    method: 'post',
    data: data
  }
}

export const deleteShop = (id) => {
  return {
    url: 'shop/delete/' + id,
    method: 'post'
  }
}

export const ExamineShop = (data) => {
  return {
    url: 'shop/user_certify',
    method: 'post',
    data
  }
}

export const certifyShop = (data) => {
  return {
    url: 'shop/certify_manage',
    method: 'post',
    data
  }
}

export const getShopPage = (data = {}) => {
  return {
    url: 'shop/page',
    method: 'get',
    data: data
  }
}

export const getAllShopPage = (data = {}) => {
  return {
    url: '/shop/shop_page',
    method: 'get',
    data: data
  }
}

export const getShopDetailByIDd = (id) => {
  return {
    url: `shop/${id}`,
    method: 'get'
  }
}

// 生成订单
export const createProductOrder = (data) => {
  return {
    url: '/shop/create_order',
    method: 'post',
    data
  }
}

// 审核分页
export const getCertifyPage = (data) => {
  return {
    url: '/shop/certify_page',
    method: 'get',
    data
  }
}

// 推荐
export const getShopList = () => {
  return {
    url: '/shop/shop_list',
    method: 'get'
  }
}

// 根据type取值
export const getIndexList = () => {
  return {
    url: '/shop/index/list',
    method: 'get'
  }
}

export const createOrder = () => {
  return {
    url: '/shop/create_order',
    method: 'post'
  }
}
